<demo>
## 饼图
饼图
</demo>

<!-- #region snippet -->
<template>
    <x-chart
        :height="250"
        :option="option"></x-chart>
</template>

<script setup>
import { ref } from 'vue'
const { data = [], series } = defineProps({ data: {} })

const option = ref({
    tooltip: {
        trigger: 'item',
    },
    legend: {
        top: 0,
        left: 'center',
    },
    series: [
        {
            name: '指标分布',
            type: 'pie',
            radius: ['40%', '70%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                position: 'center',
            },
            labelLine: {
                show: false,
            },
            data: data,
        },
    ],
})
</script>

<style lang="less" scoped></style>
<!-- #endregion snippet -->
